package com.tsinghuabigdata.edu.ddmath.fragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.tsinghuabigdata.edu.ddmath.R;
import com.tsinghuabigdata.edu.ddmath.activity.MainActivity;
import com.tsinghuabigdata.edu.ddmath.module.login.view.BindMobileActivity;
import com.tsinghuabigdata.edu.ddmath.module.login.view.LoginActivity;
import com.tsinghuabigdata.edu.ddmath.module.login.view.RegisterActivity;
import com.tsinghuabigdata.edu.ddmath.module.mycenter.EditPersonalinfoActivity;
import com.tsinghuabigdata.edu.ddmath.module.neteaseim.education.activity.EnterRoomActivity;
import com.tsinghuabigdata.edu.ddmath.module.neteaseim.education.activity.TestRoomActivity;


/**
 * 个人中心
 * Created by Administrator on 2016/12/14.
 */

public class MyCenterFragment extends MyBaseFragment implements View.OnClickListener {
    private static final String TAG = "MyCenterFragment";

    private View root;
    private TextView btRegister;
    private TextView btLogin;

    private MainActivity mainActivity;
    private String mAccessToken;
    private String mTeacherId;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        root = inflater.inflate(R.layout.fragment_my_center, container, false);

        initView();
        initData();
        return root;
    }

    private void initView() {
        mainActivity = (MainActivity) getActivity();
        btRegister = (TextView) root.findViewById(R.id.bt_register);
        btLogin = (TextView) root.findViewById(R.id.bt_login);

        btRegister.setOnClickListener(this);
        btLogin.setOnClickListener(this);
    }


    private void initData() {
    }

    @Override
    public void onStart() {
        super.onStart();
        Log.d(TAG, "onStart: ");
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d(TAG, "onCreate: ");
    }

    @Override
    public void onResume() {
        super.onResume();
        Log.d(TAG, "onResume: ");
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        Log.d(TAG, "onDestroyView: ");
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Log.d(TAG, "onDestroy: ");
    }

    @Override
    public void onStop() {
        super.onStop();
        Log.d(TAG, "onStop: ");
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_register:
                mainActivity.goActivity(TestRoomActivity.class);
//                mainActivity.goActivity(RegisterActivity.class);
                break;
            case R.id.bt_login:
//                mainActivity.goActivity(LoginActivity.class);
//                mainActivity.goActivity(BindMobileActivity.class);
                mainActivity.goActivity(EnterRoomActivity.class);
                break;
        }
    }
}
